<?php
/**
 *
 * @author Eric
 * @version
 */
/**
 * SmartUrl helper
 *
 * @uses viewHelper Zend_View_Helper
 */
class Jnd_View_Helper_SmartUrl extends Zend_View_Helper_Abstract
{

    /**
     *
     */
    public function smartUrl($action = null, $controller = null, $module = null, $params = array(), $name = null, $reset = true)
    {
        $moduleInfo = $this->view->getModuleInfo();
        $params = array_merge($params,
            array(
                'module' => is_null($module) ? $moduleInfo->module : $module,
                'controller' => is_null($controller) ? $moduleInfo->controller : $controller,
                'action' => is_null($action) ? $moduleInfo->action : $action));
        return $this->view->url($params, $name, $reset);
    }
}

